Optimal. Leaf size=113 \[ -\frac{(3 d g+e f) (e f-d g)}{8 d^2 e^3 (d+e x)^2}-\frac{(d g+e f)^2}{8 d^3 e^3 (d+e x)}+\frac{(d g+e f)^2 \tanh ^{-1}\left (\frac{e x}{d}\right )}{8 d^4 e^3}-\frac{(e f-d g)^2}{6 d e^3 (d+e x)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.115919, antiderivative size = 113, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {848, 88, 208} \[ -\frac{(3 d g+e f) (e f-d g)}{8 d^2 e^3 (d+e x)^2}-\frac{(d g+e f)^2}{8 d^3 e^3 (d+e x)}+\frac{(d g+e f)^2 \tanh ^{-1}\left (\frac{e x}{d}\right )}{8 d^4 e^3}-\frac{(e f-d g)^2}{6 d e^3 (d+e x)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 848
Rule 88
Rule 208
Rubi steps
\begin{align*} \int \frac{(f+g x)^2}{(d+e x)^3 \left (d^2-e^2 x^2\right )} \, dx &=\int \frac{(f+g x)^2}{(d-e x) (d+e x)^4} \, dx\\ &=\int \left (\frac{(-e f+d g)^2}{2 d e^2 (d+e x)^4}+\frac{(e f-d g) (e f+3 d g)}{4 d^2 e^2 (d+e x)^3}+\frac{(e f+d g)^2}{8 d^3 e^2 (d+e x)^2}+\frac{(e f+d g)^2}{8 d^3 e^2 \left (d^2-e^2 x^2\right )}\right ) \, dx\\ &=-\frac{(e f-d g)^2}{6 d e^3 (d+e x)^3}-\frac{(e f-d g) (e f+3 d g)}{8 d^2 e^3 (d+e x)^2}-\frac{(e f+d g)^2}{8 d^3 e^3 (d+e x)}+\frac{(e f+d g)^2 \int \frac{1}{d^2-e^2 x^2} \, dx}{8 d^3 e^2}\\ &=-\frac{(e f-d g)^2}{6 d e^3 (d+e x)^3}-\frac{(e f-d g) (e f+3 d g)}{8 d^2 e^3 (d+e x)^2}-\frac{(e f+d g)^2}{8 d^3 e^3 (d+e x)}+\frac{(e f+d g)^2 \tanh ^{-1}\left (\frac{e x}{d}\right )}{8 d^4 e^3}\\ \end{align*}
Mathematica [A] time = 0.0583331, size = 122, normalized size = 1.08 \[ \frac{\frac{6 d^2 \left (3 d^2 g^2-2 d e f g-e^2 f^2\right )}{(d+e x)^2}-\frac{8 d^3 (e f-d g)^2}{(d+e x)^3}-\frac{6 d (d g+e f)^2}{d+e x}-3 (d g+e f)^2 \log (d-e x)+3 (d g+e f)^2 \log (d+e x)}{48 d^4 e^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.054, size = 259, normalized size = 2.3 \begin{align*} -{\frac{\ln \left ( ex-d \right ){g}^{2}}{16\,{d}^{2}{e}^{3}}}-{\frac{\ln \left ( ex-d \right ) fg}{8\,{d}^{3}{e}^{2}}}-{\frac{\ln \left ( ex-d \right ){f}^{2}}{16\,{d}^{4}e}}+{\frac{3\,{g}^{2}}{8\,{e}^{3} \left ( ex+d \right ) ^{2}}}-{\frac{fg}{4\,d{e}^{2} \left ( ex+d \right ) ^{2}}}-{\frac{{f}^{2}}{8\,{d}^{2}e \left ( ex+d \right ) ^{2}}}-{\frac{{g}^{2}d}{6\,{e}^{3} \left ( ex+d \right ) ^{3}}}+{\frac{fg}{3\,{e}^{2} \left ( ex+d \right ) ^{3}}}-{\frac{{f}^{2}}{6\,de \left ( ex+d \right ) ^{3}}}+{\frac{\ln \left ( ex+d \right ){g}^{2}}{16\,{d}^{2}{e}^{3}}}+{\frac{\ln \left ( ex+d \right ) fg}{8\,{d}^{3}{e}^{2}}}+{\frac{\ln \left ( ex+d \right ){f}^{2}}{16\,{d}^{4}e}}-{\frac{{g}^{2}}{8\,d{e}^{3} \left ( ex+d \right ) }}-{\frac{fg}{4\,{d}^{2}{e}^{2} \left ( ex+d \right ) }}-{\frac{{f}^{2}}{8\,{d}^{3}e \left ( ex+d \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.992291, size = 278, normalized size = 2.46 \begin{align*} -\frac{10 \, d^{2} e^{2} f^{2} + 4 \, d^{3} e f g - 2 \, d^{4} g^{2} + 3 \,{\left (e^{4} f^{2} + 2 \, d e^{3} f g + d^{2} e^{2} g^{2}\right )} x^{2} + 3 \,{\left (3 \, d e^{3} f^{2} + 6 \, d^{2} e^{2} f g - d^{3} e g^{2}\right )} x}{24 \,{\left (d^{3} e^{6} x^{3} + 3 \, d^{4} e^{5} x^{2} + 3 \, d^{5} e^{4} x + d^{6} e^{3}\right )}} + \frac{{\left (e^{2} f^{2} + 2 \, d e f g + d^{2} g^{2}\right )} \log \left (e x + d\right )}{16 \, d^{4} e^{3}} - \frac{{\left (e^{2} f^{2} + 2 \, d e f g + d^{2} g^{2}\right )} \log \left (e x - d\right )}{16 \, d^{4} e^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.80371, size = 807, normalized size = 7.14 \begin{align*} -\frac{20 \, d^{3} e^{2} f^{2} + 8 \, d^{4} e f g - 4 \, d^{5} g^{2} + 6 \,{\left (d e^{4} f^{2} + 2 \, d^{2} e^{3} f g + d^{3} e^{2} g^{2}\right )} x^{2} + 6 \,{\left (3 \, d^{2} e^{3} f^{2} + 6 \, d^{3} e^{2} f g - d^{4} e g^{2}\right )} x - 3 \,{\left (d^{3} e^{2} f^{2} + 2 \, d^{4} e f g + d^{5} g^{2} +{\left (e^{5} f^{2} + 2 \, d e^{4} f g + d^{2} e^{3} g^{2}\right )} x^{3} + 3 \,{\left (d e^{4} f^{2} + 2 \, d^{2} e^{3} f g + d^{3} e^{2} g^{2}\right )} x^{2} + 3 \,{\left (d^{2} e^{3} f^{2} + 2 \, d^{3} e^{2} f g + d^{4} e g^{2}\right )} x\right )} \log \left (e x + d\right ) + 3 \,{\left (d^{3} e^{2} f^{2} + 2 \, d^{4} e f g + d^{5} g^{2} +{\left (e^{5} f^{2} + 2 \, d e^{4} f g + d^{2} e^{3} g^{2}\right )} x^{3} + 3 \,{\left (d e^{4} f^{2} + 2 \, d^{2} e^{3} f g + d^{3} e^{2} g^{2}\right )} x^{2} + 3 \,{\left (d^{2} e^{3} f^{2} + 2 \, d^{3} e^{2} f g + d^{4} e g^{2}\right )} x\right )} \log \left (e x - d\right )}{48 \,{\left (d^{4} e^{6} x^{3} + 3 \, d^{5} e^{5} x^{2} + 3 \, d^{6} e^{4} x + d^{7} e^{3}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 1.40659, size = 248, normalized size = 2.19 \begin{align*} - \frac{- 2 d^{4} g^{2} + 4 d^{3} e f g + 10 d^{2} e^{2} f^{2} + x^{2} \left (3 d^{2} e^{2} g^{2} + 6 d e^{3} f g + 3 e^{4} f^{2}\right ) + x \left (- 3 d^{3} e g^{2} + 18 d^{2} e^{2} f g + 9 d e^{3} f^{2}\right )}{24 d^{6} e^{3} + 72 d^{5} e^{4} x + 72 d^{4} e^{5} x^{2} + 24 d^{3} e^{6} x^{3}} - \frac{\left (d g + e f\right )^{2} \log{\left (- \frac{d \left (d g + e f\right )^{2}}{e \left (d^{2} g^{2} + 2 d e f g + e^{2} f^{2}\right )} + x \right )}}{16 d^{4} e^{3}} + \frac{\left (d g + e f\right )^{2} \log{\left (\frac{d \left (d g + e f\right )^{2}}{e \left (d^{2} g^{2} + 2 d e f g + e^{2} f^{2}\right )} + x \right )}}{16 d^{4} e^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]